#include<iostream>
using namespace std;
int main()
{
	int n;
	cin >> n;
	int num, success;
	cin >> num >> success;
	double result = 1.0 * success / num;
	for (int i = 0;i < n - 1;i++)
	{
		cin >> num >> success;
		double res = 1.0 * success / num;
		if (res - result>0.05)
		{
			cout << "better"<<endl;
		}
		else if(result-res>0.05)
		{
			cout << "worse"<<endl;
		}
		else
		{
			cout << "same"<<endl;
		}
	}
	return 0;
}